//
//  HNHappyWishSmallTargetCell.m
//  XDEducation
//
//  Created by 星道 on 17/5/24.
//  Copyright © 2017年 apple. All rights reserved.
//

#import "HNHappyWishSmallTargetCell.h"

@implementation HNHappyWishSmallTargetCell
{
    IBOutlet UILabel *_Promise;
    IBOutlet UILabel *_Goal;
    IBOutlet UILabel *_Supervisor_nickname;
    IBOutlet UILabel *_Execute_nickname;
    IBOutlet UILabel *_awark_num;
    IBOutlet UILabel *_Long_time;
    IBOutlet UILabel *_Star_time;
    IBOutlet UIButton *_FileBean;
    IBOutlet UIButton *_FileBeanI;
    
    IBOutlet NSLayoutConstraint *_FileBeanCondytsiny;
    IBOutlet NSLayoutConstraint *_FileBeanICondytsiny;
}


- (void)setModel:(HNHappyWishSmallTarget *)Model
{
    _Model = Model;
    
    _Promise.text = Model.promise;
    _Goal.text    = Model.goal;
    _Supervisor_nickname.text = Model.supervisor_nickname;
    _Execute_nickname.text = Model.execute_nickname;
    _awark_num.text = [[Model.award_num stringValue] stringByAppendingString:@"朵"];
    _Long_time.text = [[Model.long_time stringValue] stringByAppendingString:@"天"];
    _Star_time.text = Model.star_time;
    
    if ([Model.fileBean_path isKindOfClass:[NSNull class]])
    {
        _FileBean.hidden = YES;
        _FileBeanCondytsiny.constant = 0;
    }
    else
    {
        _FileBean.hidden = NO;
        _FileBeanCondytsiny.constant = 60;
    }
    
    if ([Model.fileBeanI_path isKindOfClass:[NSNull class]])
    {
        _FileBeanI.hidden = YES;
        _FileBeanICondytsiny.constant = 0;
    }
    else
    {
        _FileBeanI.hidden = NO;
        _FileBeanICondytsiny.constant = 60;
    }
}




- (IBAction)YueDingAction:(UIButton *)sender
{
    if (self.SeeImg)
    {
        self.SeeImg (self.Model.fileBean_path);
    }
}
- (IBAction)_MuBiaoAction:(UIButton *)sender
{
    if (self.SeeImg)
    {
        self.SeeImg (self.Model.fileBeanI_path);
    }
}

@end
